import request from '@/utils/request'

// 查询班组列表
export function listEquipment(query) {
  return request({
    url: '/prs/equipment/list',
    method: 'get',
    params: query
  })
}

//字典
export function dictMatching (data) {
  return request({
    url: '/system/dict/data/type/'+ data,
    method: 'get',
  })
}

// 查询班组详细
export function getEquipment(roleId) {
  return request({
    url: '/prs/equipment/' + roleId,
    method: 'get'
  })
}

// 新增班组
export function addEquipment(data) {
  return request({
    url: '/prs/equipment',
    method: 'post',
    data: data
  })
}

// 修改班组
export function updateEquipment(data) {
  return request({
    url: '/prs/equipment',
    method: 'put',
    data: data
  })
}


// 删除班组
export function delEquipment(roleId) {
  return request({
    url: '/prs/equipment/' + roleId,
    method: 'delete'
  })
}

// 导出班组
export function exportEquipment(query) {
  return request({
    url: '/prs/equipment/export',
    method: 'get',
    params: query
  })
}